package fun.boomcat.luckyhe.mirai.plugin.luckymoney.util;

import net.mamoe.mirai.console.command.CommandSender;
import net.mamoe.mirai.message.data.At;
import net.mamoe.mirai.message.data.MessageChainBuilder;

/**
 * @author Lucky_He
 * @date 2021年9月14日 0:03
 * @description SendMessageUtil
 */
public class SendMessageUtil {
    public static void sendMessage(CommandSender commandSender, String message) {
        commandSender.sendMessage(new MessageChainBuilder().append(
                new At(commandSender.getUser() == null ? 0L : commandSender.getUser().getId())
        ).append("\n").append(message).build());
    }
}
